<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>个人中心</title>
    <link rel="stylesheet" href="/stylesheets/personnal.css">
    <link rel="stylesheet" href="/stylesheets/xiuxiu.css">
</head>
<body>
<!--导航-->
<%include nav.html%>
    <div class="personnal_container">
        <!--左边内容-->
        <div class="person_left">
            <div class="left_icon">
                <img src="/images/dog_icon.png" alt="" style="width: 120px;height: 120px">
            </div>
            <ul>
                <a href="/users"><li class="bgcolor">查看用户信息</li></a>
                <a href="/users/apply_foster"><li>申请寄养家庭</li></a>
                <a href="/users/mypet"> <li>我的宠物</li></a>
                <a href="/users/collection"> <li>宠物故事</li></a>
                <a href="/users/myorder"><li>我的订单</li></a>
            </ul>
        </div>
        <!--右边订单-->
        <div class="person_right">
            <div class="right_top">
                <div class="user_icon">
                    <%
                    if(res==0){
                    %>
                    <img src="/images/icon.jpg" alt="" class="icon_img">
                    <%
                    }else{
                    %>
                    <img src="/images/<%=pic%>" alt="" class="icon_img">
                    <%
                    }
                    %>
                </div>
                <div class="person_info">

                    <div class="div_info" style="color: #000001">
                        昵称：<%=username%>
                    </div>

                    <div class="div_info">
                        <a href="/users/editor-basic">编辑个人资料</a>
                    </div>

                    <div class="div_info">
                        <a href="/addart">[退出]</a>
                    </div>
                </div>
            </div>
            <div class="personnal-info">
                <div class="div_info1">
                    <span>性别:</span>
                    <span>
                            <%
                            if(res==0){
                            %>

                             没有设置
                            <%
                            }else if(res[0].usersex==2){
                            %>

                            女
                            <%
                            }else{
                            %>
                            男
                            <%
                            }
                            %>
                </span>
                </div>

                <div class="div_info1">
                    <span>地址:</span>
                    <span>

                            <%
                            if(res==0){
                            %>
                            还未设置地址
                            <%
                            }else if(res[0].useraddress==null){
                            %>
                            还未设置地址

                            <%
                            }else{
                            %>


                            <%=res[0].useraddress%>
                            <%
                            }

                            %>
                        </span>
                </div>
                <div class="div_info1">
                    <span>出生日期:</span>

                    <span class="date"><%if(res==0){%>空<%}else if(res[0].userbirth==null){%>空<%}else{%><%=res[0].userbirth%><%}%></span>
                </div>

                <div class="div_info1">
                    <span>用户类型:</span>
                    <span>

                            <%
                            if(res==0){
                            %>
                            普通用户
                            <%
                            }else if(res[0].usertype==2){
                            %>

                            普通用户

                            <%
                            }else{
                            %>
                             商家
                            <%
                            }
                            %>
                </span>
                </div>
            </div>
        </div>
    </div>
<%include footer.html%>
<!--<script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>-->
<script src="/js/jquery-1.8.3.js"></script>
<script>

    $(function(){
        function FormatDate (strTime) {
            var date = new Date(strTime);
            return date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate();
        }
      if($('.date').html()!='空'){
          $('.date').html(FormatDate($('.date').html()));
      }

    })

</script>
</body>
</html>